<?php


namespace app\table\controller;


use app\self\controller\Extend;

class Index extends Extend
{
    /**
     * use   菜单
     * user  Hugh
     * date  2021/7/13 10:03
     * @return array
     */
    public function menu()
    {
        $data = [
            'pid' => 135,
            'title' => '表格',
            'sort' => 5,
            'ico' => 'fa fa-list-ol',
        ];

        return $data;
    }

    /**
     * use   数据库字段
     * user  Hugh
     * date  2021/7/13 10:04
     */
    public function databaseField()
    {
        $data['database'] = [
            ['field'=>'phone','type'=>'varchar','length'=>255,'title'=>'手机号码','search','add'=>'img','show','notNull'],
            ['field'=>'status','type'=>'tinyint','length'=>1,'title'=>'状态','show','search'=>'select','default'=>1],
            ['field'=>'create_time','type'=>'date','length'=>'0','title'=>'状态'],
            ['field'=>'update_time','type'=>'date','length'=>'0','title'=>'状态'],
        ];

        $data['remark'] = '表格';
        return $data;
    }

    /**
     * use   下拉框选择项
     * user  Hugh
     * date  2021/7/14 9:43
     */
    public function selectOption()
    {
        $data = [
            'status'=>[1,2,3,4,5,6,7]
        ];

        return $data;
    }






}